3.145 \(\int \cot ^4(c+d x) \sqrt{a+a \sec (c+d x)} \, dx\)

Optimal. Leaf size=196 \[ \frac{\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{12 a d}+\frac{7 \cot (c+d x) \sqrt{a \sec (c+d x)+a}}{8 d}+\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a \sec (c+d x)+a}}\right )}{d}-\frac{9 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a \sec (c+d x)+a}}\right )}{8 \sqrt{2} d}-\frac{\cos (c+d x) \cot ^3(c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) (a \sec (c+d x)+a)^{3/2}}{4 a d} \]

[Out]

(2*Sqrt[a]*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/d - (9*Sqrt[a]*ArcTan[(Sqrt[a]*Tan[c + d*x
])/(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/(8*Sqrt[2]*d) + (7*Cot[c + d*x]*Sqrt[a + a*Sec[c + d*x]])/(8*d) + (Cot
[c + d*x]^3*(a + a*Sec[c + d*x])^(3/2))/(12*a*d) - (Cos[c + d*x]*Cot[c + d*x]^3*Sec[(c + d*x)/2]^2*(a + a*Sec[
c + d*x])^(3/2))/(4*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.203387, antiderivative size = 196, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {3887, 472, 583, 522, 203} \[ \frac{\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{12 a d}+\frac{7 \cot (c+d x) \sqrt{a \sec (c+d x)+a}}{8 d}+\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a \sec (c+d x)+a}}\right )}{d}-\frac{9 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a \sec (c+d x)+a}}\right )}{8 \sqrt{2} d}-\frac{\cos (c+d x) \cot ^3(c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) (a \sec (c+d x)+a)^{3/2}}{4 a d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^4*Sqrt[a + a*Sec[c + d*x]],x]

[Out]

(2*Sqrt[a]*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/d - (9*Sqrt[a]*ArcTan[(Sqrt[a]*Tan[c + d*x
])/(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/(8*Sqrt[2]*d) + (7*Cot[c + d*x]*Sqrt[a + a*Sec[c + d*x]])/(8*d) + (Cot
[c + d*x]^3*(a + a*Sec[c + d*x])^(3/2))/(12*a*d) - (Cos[c + d*x]*Cot[c + d*x]^3*Sec[(c + d*x)/2]^2*(a + a*Sec[
c + d*x])^(3/2))/(4*a*d)

Rule 3887

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[(-2*a^(m/2 +
 n + 1/2))/d, Subst[Int[(x^m*(2 + a*x^2)^(m/2 + n - 1/2))/(1 + a*x^2), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c +
d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && IntegerQ[n - 1/2]

Rule 472

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(b*(e*x
)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*e*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d)*(
p + 1)), Int[(e*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*b*(m + 1) + n*(b*c - a*d)*(p + 1) + d*b*(m + n*(
p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[p
, -1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 583

Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[(e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*c*g*(m + 1)), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
 IGtQ[n, 0] && LtQ[m, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \cot ^4(c+d x) \sqrt{a+a \sec (c+d x)} \, dx &=-\frac{2 \operatorname{Subst}\left (\int \frac{1}{x^4 \left (1+a x^2\right ) \left (2+a x^2\right )^2} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{a d}\\ &=-\frac{\cos (c+d x) \cot ^3(c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) (a+a \sec (c+d x))^{3/2}}{4 a d}-\frac{\operatorname{Subst}\left (\int \frac{-a-5 a^2 x^2}{x^4 \left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{2 a^2 d}\\ &=\frac{\cot ^3(c+d x) (a+a \sec (c+d x))^{3/2}}{12 a d}-\frac{\cos (c+d x) \cot ^3(c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) (a+a \sec (c+d x))^{3/2}}{4 a d}+\frac{\operatorname{Subst}\left (\int \frac{21 a^2-3 a^3 x^2}{x^2 \left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{12 a^2 d}\\ &=\frac{7 \cot (c+d x) \sqrt{a+a \sec (c+d x)}}{8 d}+\frac{\cot ^3(c+d x) (a+a \sec (c+d x))^{3/2}}{12 a d}-\frac{\cos (c+d x) \cot ^3(c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) (a+a \sec (c+d x))^{3/2}}{4 a d}-\frac{\operatorname{Subst}\left (\int \frac{69 a^3+21 a^4 x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{24 a^2 d}\\ &=\frac{7 \cot (c+d x) \sqrt{a+a \sec (c+d x)}}{8 d}+\frac{\cot ^3(c+d x) (a+a \sec (c+d x))^{3/2}}{12 a d}-\frac{\cos (c+d x) \cot ^3(c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) (a+a \sec (c+d x))^{3/2}}{4 a d}+\frac{(9 a) \operatorname{Subst}\left (\int \frac{1}{2+a x^2} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{8 d}-\frac{(2 a) \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,-\frac{\tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{d}\\ &=\frac{2 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{d}-\frac{9 \sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a+a \sec (c+d x)}}\right )}{8 \sqrt{2} d}+\frac{7 \cot (c+d x) \sqrt{a+a \sec (c+d x)}}{8 d}+\frac{\cot ^3(c+d x) (a+a \sec (c+d x))^{3/2}}{12 a d}-\frac{\cos (c+d x) \cot ^3(c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right ) (a+a \sec (c+d x))^{3/2}}{4 a d}\\ \end{align*}

Mathematica [C]  time = 23.6937, size = 5562, normalized size = 28.38 \[ \text{Result too large to show} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Cot[c + d*x]^4*Sqrt[a + a*Sec[c + d*x]],x]

[Out]

Result too large to show

________________________________________________________________________________________

Maple [B]  time = 0.278, size = 381, normalized size = 1.9 \begin{align*} -{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{2}-1}{48\,d \left ( \sin \left ( dx+c \right ) \right ) ^{5}}\sqrt{{\frac{a \left ( \cos \left ( dx+c \right ) +1 \right ) }{\cos \left ( dx+c \right ) }}} \left ( 48\,\sqrt{2} \left ( \cos \left ( dx+c \right ) \right ) ^{2}\sin \left ( dx+c \right ) \sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( dx+c \right ) }{\cos \left ( dx+c \right ) }\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}} \right ) +27\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}\sin \left ( dx+c \right ) \sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}\ln \left ( -{\frac{1}{\sin \left ( dx+c \right ) } \left ( -\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}\sin \left ( dx+c \right ) +\cos \left ( dx+c \right ) -1 \right ) } \right ) -48\,\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( dx+c \right ) }{\cos \left ( dx+c \right ) }\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}} \right ) \sin \left ( dx+c \right ) -62\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}-27\,\sin \left ( dx+c \right ) \ln \left ( -{\frac{1}{\sin \left ( dx+c \right ) } \left ( -\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}\sin \left ( dx+c \right ) +\cos \left ( dx+c \right ) -1 \right ) } \right ) \sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}+4\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}+42\,\cos \left ( dx+c \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^4*(a+a*sec(d*x+c))^(1/2),x)

[Out]

-1/48/d*(a*(cos(d*x+c)+1)/cos(d*x+c))^(1/2)*(48*2^(1/2)*cos(d*x+c)^2*sin(d*x+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1))
^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)/cos(d*x+c))+27*cos(d*x+c)^2*sin(d*x
+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*ln(-(-(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)+cos(d*x+c)-1)/s
in(d*x+c))-48*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*2^(1/2)*arctanh(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^
(1/2)*sin(d*x+c)/cos(d*x+c))*sin(d*x+c)-62*cos(d*x+c)^3-27*sin(d*x+c)*ln(-(-(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/
2)*sin(d*x+c)+cos(d*x+c)-1)/sin(d*x+c))*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)+4*cos(d*x+c)^2+42*cos(d*x+c))/sin
(d*x+c)^5*(cos(d*x+c)^2-1)

________________________________________________________________________________________

Maxima [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [A]  time = 2.60703, size = 1449, normalized size = 7.39 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

[1/96*(27*(sqrt(2)*cos(d*x + c)^2 - sqrt(2))*sqrt(-a)*log((2*sqrt(2)*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*
x + c))*cos(d*x + c)*sin(d*x + c) + 3*a*cos(d*x + c)^2 + 2*a*cos(d*x + c) - a)/(cos(d*x + c)^2 + 2*cos(d*x + c
) + 1))*sin(d*x + c) + 48*(cos(d*x + c)^2 - 1)*sqrt(-a)*log(-(8*a*cos(d*x + c)^3 - 4*(2*cos(d*x + c)^2 - cos(d
*x + c))*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c) - 7*a*cos(d*x + c) + a)/(cos(d*x + c) +
 1))*sin(d*x + c) + 4*(31*cos(d*x + c)^3 - 2*cos(d*x + c)^2 - 21*cos(d*x + c))*sqrt((a*cos(d*x + c) + a)/cos(d
*x + c)))/((d*cos(d*x + c)^2 - d)*sin(d*x + c)), 1/48*(48*(cos(d*x + c)^2 - 1)*sqrt(a)*arctan(2*sqrt(a)*sqrt((
a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)*sin(d*x + c)/(2*a*cos(d*x + c)^2 + a*cos(d*x + c) - a))*sin(d*x
 + c) + 27*(sqrt(2)*cos(d*x + c)^2 - sqrt(2))*sqrt(a)*arctan(sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*c
os(d*x + c)/(sqrt(a)*sin(d*x + c)))*sin(d*x + c) + 2*(31*cos(d*x + c)^3 - 2*cos(d*x + c)^2 - 21*cos(d*x + c))*
sqrt((a*cos(d*x + c) + a)/cos(d*x + c)))/((d*cos(d*x + c)^2 - d)*sin(d*x + c))]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**4*(a+a*sec(d*x+c))**(1/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^4*(a+a*sec(d*x+c))^(1/2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError